<!DOCTYPE html>


  <html class="light page-home">


<head>
  <meta charset="utf-8">
  
  <title>Yadong&#39;s Blog</title>

  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

  
    <meta name="keywords" content="poetries,前端,设计,Hexo主题,前端开发,用户体验,设计,frontend,design,nodejs,JavaScript" />
  

  <meta name="description" content="执于一种追求">
<meta property="og:type" content="website">
<meta property="og:title" content="Yadong&#39;s Blog">
<meta property="og:url" content="http://www.xieyadong.cn/index.html">
<meta property="og:site_name" content="Yadong&#39;s Blog">
<meta property="og:description" content="执于一种追求">
<meta property="og:locale" content="zh-Hans">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Yadong&#39;s Blog">
<meta name="twitter:description" content="执于一种追求">

  

  
    <link rel="icon" href="favicon.ico">
  

  <link href="css/styles.css" rel="stylesheet">


  

  

  

  <!-- 加载gitment的css文件 -->
<link rel="stylesheet" href="css/gitment.css"> 
</head>

<body>


  

  
  
<canvas id="canvas" style="position:absolute;width:100%;height:100%;background:#000;"></canvas>
<div class="content-home text-center" style="background:#000;">
  <a class="avatar" href="/">
    <img src="images/avatar.jpg" alt="" />
  </a>
  <h1 class="name" style="font-family: calligraffittiregular">
    Yadong&#39;s Blog
  </h1>
  <div class="slogan">
    Choose a gesture to allow yourself to live irreplaceable
  </div>

  <hr>

  <ul class="text-center nav">
    
      <li class="item">
        
          <a href="http://small.xieyadong.cn/">Blog</a>
        
        <span>|</span>
      </li>
    
      <li class="item">
        
          <a href="https://github.com/yyccQQu" rel="noopener noreferrer" target="_blank">Github</a>
        
        <span>|</span>
      </li>
    
      <li class="item">
        
          <a href="" rel="noopener noreferrer" target="_blank">Jianshu</a>
        
        <span>|</span>
      </li>
    
      <li class="item">
        
          <a href="" target="_blank">Handbook</a>
        
        <span>|</span>
      </li>
    
      <li class="item">
        
          <a href="http://www.xieyadong.cn" rel="noopener noreferrer" target="_blank">Life</a>
        
        <span>|</span>
      </li>
    
  </ul>
	
</div>
<p style="text-align:center;position:absolute;bottom:0px;left:50%;"><script type="text/javascript" src="http://tajs.qq.com/stats?sId=59154049" charset="UTF-8"></script></p>
<SCRIPT language=javascript> 
function clickk(e) {
	if (document.all) {
		if (event.button==2||event.button==3) { 
			alert("欢迎光临寒舍，有什么需要帮忙的话，请与站长联系！谢谢您的合作！！！");
			oncontextmenu='return false';
		}
	}
	if (document.layers) {
		if (e.which == 3) {
			oncontextmenu='return false';
		}
	}
}
	if (document.layers) {
		document.captureEvents(Event.MOUSEDOWN);
	}
	document.onmousedown=clickk;
	document.oncontextmenu = new Function("return false;")
document.onkeydown =document.onkeyup = document.onkeypress=function(){ 
	if(window.event.keyCode == 123) { 
		window.event.returnValue=false;
		return(false); 
	} 
} 
</SCRIPT> 
	
<script>
		window.requestAnimFrame = ( function() {
			return window.requestAnimationFrame ||
						window.webkitRequestAnimationFrame ||
						window.mozRequestAnimationFrame ||
						function( callback ) {
							window.setTimeout( callback, 1000 / 60 );
						};
		})();
		var can = document.getElementById("canvas");
		var cxt = can.getContext("2d");
		can.width = window.innerWidth;
		can.height = window.innerHeight;
		cxt.lineWidth = 0.3;
		//初始链接线条显示位置
		var mousePosition = {
			x : 30*can.width/100,
			y : 30*can.height/100
		}
		//圆形粒子对象参数
		var dots = {
			n : 500,//圆形粒子个数
			distance : 50,//圆形粒子之间的距离
			d_radius : 100,//粒子距离鼠标点的距离
			array : []//保存n个圆形粒子对象
		}
		//创建随即颜色值
		function colorValue(min){
			return Math.floor(Math.random()*255 + min);
		}
		function createColorStyle(r,g,b){
			return "rgba("+r+","+g+","+b+", 1)";
		}
		//混合两个圆形粒子的颜色
		function mixConnect(c1,r1,c2,r2){//圆的颜色 半径
			return (c1*r1+c2*r2)/(r1+r2);
		};
		//生成线条的颜色
		function lineColor(dot1,dot2){//获取具体的圆的颜色再计算
			var color1 = dot1.color,
				color2 = dot2.color;
			var r = mixConnect(color1.r,dot1.radius,color2.r,dot2.radius);
			var g = mixConnect(color1.g,dot1.radius,color2.g,dot2.radius);
			var b = mixConnect(color1.b,dot1.radius,color2.b,dot2.radius);
			return createColorStyle(Math.floor(r),Math.floor(g),Math.floor(b));
		}
		//生成圆形粒子的颜色对象
		function Color(min){
			min = min || 0;
			this.r = colorValue(min);
			this.g = colorValue(min);
			this.b = colorValue(min);
			this.style = createColorStyle(this.r,this.g,this.b);
		}
		//创建圆形粒子对象
		function Dot(){
			//圆形粒子随机圆心坐标点
			this.x = Math.random()*can.width;
			this.y = Math.random()*can.height;
			//x y 方向运动的速度值
			this.vx = -0.5 + Math.random();
			this.vy = -0.5 + Math.random();

			this.radius = Math.random()*5;
			//this.color = "#ff3333";
			this.color = new Color();
		}
		//绘制出圆形粒子
		Dot.prototype.draw = function(){
			cxt.beginPath();
			cxt.fillStyle = this.color.style;
			cxt.arc(this.x,this.y,this.radius,0,Math.PI*2,false);
			cxt.fill();
		}
		//添加圆形粒子
		function createCircle(){
			for (var i=0;i<dots.n ;i++ )
			{
				dots.array.push(new Dot());
			}
		}
		//绘制出圆形粒子
		function drawDots(){
			for (var i=0;i<dots.n ;i++ )
			{
				var dot = dots.array[i];
				dot.draw();
			}
		}
		
		//drawDots();
		//移动
		function moveDots(){
			for (var i=0;i<dots.n ;i++ ){
				var dot = dots.array[i];
				//当圆形粒子对象碰壁的时候就反弹回来
				if (dot.y < 0 || dot.y > can.height)
				{
					dot.vx = dot.vx;
					dot.vy = -dot.vy;
				}else if (dot.x < 0 || dot.x > can.width)
				{
					dot.vx = -dot.vx;
					dot.vy = dot.vy;
				}
				//给圆形粒子圆心坐标加上速度值移动圆形粒子
				dot.x += dot.vx;
				dot.y += dot.vy;
			}
		}
		//链接粒子对象
		function connectDots(){
			for (var i=0;i<dots.n ; i++)
			{
				for ( var j=0;j<dots.n ; j++)
				{
					iDot = dots.array[i];
					jDot = dots.array[j];
					if ((iDot.x - jDot.x) < dots.distance && (iDot.y - jDot.y) < dots.distance && (iDot.x - jDot.x) > -dots.distance && (iDot.y - jDot.y) > -dots.distance)
					{
						if ((iDot.x - mousePosition.x) < dots.d_radius && (iDot.y - mousePosition.y) < dots.d_radius && (iDot.x - mousePosition.x) > -dots.d_radius && (iDot.y - mousePosition.y) > -dots.d_radius)
						{
							cxt.beginPath();
							//cxt.strokeStyle = "yellow";
							cxt.strokeStyle = lineColor(iDot,jDot);
							cxt.moveTo(iDot.x,iDot.y);
							cxt.lineTo(jDot.x,jDot.y);
							cxt.closePath();
							cxt.stroke();
						}
						
					}
				}
			}
		}
		createCircle();
		//让圆形粒子不断的移动
		function animateDots(){
			cxt.clearRect(0,0,can.width,can.height);
			moveDots();
			connectDots()
			drawDots();
			requestAnimFrame(animateDots);
		}
		animateDots();
		
		can.onmousemove = function(ev){
			var ev = ev || window.event;
			mousePosition.x = ev.pageX;
			mousePosition.y = ev.pageY;
		}
		can.onmouseout = function(){
			mousePosition.x = can.width/2;
			mousePosition.y = can.height/2;
		}
	</script>





  <div class="modal" id="modal">
  <span id="cover" class="cover hide"></span>
  <div id="modal-dialog" class="modal-dialog hide-dialog">
    <div class="modal-header">
      <span id="close" class="btn-close">关闭</span>
    </div>
    <hr>
    <div class="modal-body">
      <ul class="list-toolbox">
        
          <li class="item-toolbox">
            <a
              class="CIRCLE"
              href="/archives/"
              rel="noopener noreferrer"
              target="_self"
              >
              博客
            </a>
          </li>
        
          <li class="item-toolbox">
            <a
              class="CIRCLE"
              href="/categories/"
              rel="noopener noreferrer"
              target="_self"
              >
              分类
            </a>
          </li>
        
          <li class="item-toolbox">
            <a
              class="CIRCLE"
              href="/tags/"
              rel="noopener noreferrer"
              target="_self"
              >
              标签
            </a>
          </li>
        
          <li class="item-toolbox">
            <a
              class="CIRCLE"
              href="/about/"
              rel="noopener noreferrer"
              target="_self"
              >
              关于
            </a>
          </li>
        
          <li class="item-toolbox">
            <a
              class="CIRCLE"
              href="/atom.xml"
              rel="noopener noreferrer"
              target="_blank"
              >
              RSS
            </a>
          </li>
        
      </ul>

    </div>
  </div>
</div>



  

  <script type="text/javascript">
  function loadScript(url, callback) {
    var script = document.createElement('script')
    script.type = 'text/javascript';

    if (script.readyState) { //IE
      script.onreadystatechange = function() {
        if (script.readyState == 'loaded' ||
          script.readyState == 'complete') {
          script.onreadystatechange = null;
          callback();
        }
      };
    } else { //Others
      script.onload = function() {
        callback();
      };
    }

    script.src = url;
    document.getElementsByTagName('head')[0].appendChild(script);
  }

  window.onload = function() {
    loadScript('/js/bun.js', function() {
      // load success
    });
  }
</script>

</body>
</html>
